package com.example.testi18n.service.impl;

import com.example.testi18n.exception.BaseException;
import com.example.testi18n.exception.UserServiceException;
import com.example.testi18n.exception.constant.UserThrowException;
import com.example.testi18n.http.JsonResult;
import com.example.testi18n.interfaces.CallBack;
import com.example.testi18n.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;

@Slf4j
@Service
public class UserServiceImpl implements UserService {


    /**
     * 测试函数式回调接口
     */
    @Override
    public Object testCallBack(Long userId, BigDecimal money, CallBack callBack) {

//
        System.err.println("UserServiceImpl.testCallBack执行完毕");
        return callBack.test(userId);
    }


}
